# demo06.py
import requests

url = "https://www.baidu.com/s?"
kw = {"wd": "python"}  # 请求参数是一个字典 即 wd=python
headers = {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0"}
r = requests.get(url, headers=headers, params=kw)
print(r.text)
